package com.eshop.web.controllers.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.eshop.frameworks.core.controller.BaseController;
import com.eshop.model.mongodb.GoodType;
import com.eshop.service.mongodb.GoodTypeService;

@Controller
//@RequestMapping("/euser")
public class GoodsTypeController extends BaseController{
	
	@Autowired
	private GoodTypeService goodTypeService;
	@ResponseBody
//	@RequestMapping(value = "/getChildren", method = RequestMethod.POST)
	@RequestMapping(value = "/getGoodsType", method = RequestMethod.POST)
	public List<GoodType> getChildren(GoodType goodType,HttpServletRequest request) {
		return goodTypeService.getGoodTypeChildren(goodType);
	}

}
